Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(protocol): introduce ForkManager to improve protocol fork management #18508

Merged
merged 9 commits into from
Dec 16, 2024

Conversation

dantaik
Copy link
Contributor

@dantaik dantaik commented Nov 23, 2024

Currently, the TaikoL1 protocol required each fork's codebase to contain implementations for both the current fork and the next fork within the same contract. This created unnecessary code complexity and tight coupling between fork versions.

With the new ForkManager, we can:

  • Split fork implementations into separate, focused contracts
  • Maintain cleaner separation of concerns between fork versions
  • Support multiple forks as long as their storage layouts remain compatible

This change improves code maintainability and makes the fork upgrade process more modular.

BTW, I'm aware of Diamond proxy design but I'm in favor of this ForkManager implementation for its simplicity.

@dantaik dantaik marked this pull request as ready for review November 23, 2024 07:04
@dantaik
Copy link
Contributor Author

dantaik commented Nov 23, 2024

The storage layout of ForkManager is compatible with the layout of TaikoL1.

Screenshot 2024-11-23 at 15 05 37

@dantaik dantaik enabled auto-merge (squash) November 23, 2024 07:06
Copy link

openzeppelin-code bot commented Nov 23, 2024

feat(protocol): introduce ForkManager to improve protocol fork management

Generated at commit: 402da9b5cc6a3c7cde175192f93f94fd712affbd

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
3
3
0
7
41
54
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
0
0
0

For more details view the full report in OpenZeppelin Code Inspector

@dantaik dantaik disabled auto-merge December 16, 2024 06:47
@dantaik dantaik enabled auto-merge (squash) December 16, 2024 06:48
@dantaik dantaik disabled auto-merge December 16, 2024 07:28
@dantaik dantaik enabled auto-merge (squash) December 16, 2024 07:28
@dantaik dantaik requested review from YoGhurt111 and removed request for YoGhurt111 December 16, 2024 07:28
@dantaik dantaik merged commit ff5c196 into main Dec 16, 2024
6 checks passed
@dantaik dantaik deleted the ForkManager branch December 16, 2024 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants